Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development


lookupDisplayComplete event

This event occurs as soon as the lookup has displayed its values into the lookup's fill-in and linked widgets. The difference between the lookupComplete and lookupDisplayComplete hooks is mainly that the lookupDisplayComplete hook fires every time the lookup displays something. This includes when a viewer initializes.

The lookupDisplayComplete event is published from displaylookup in lookup.p with the following parameters:

DEFINE INPUT PARAMETER pcFieldNames     AS CHARACTER  NO-UNDO. 
DEFINE INPUT PARAMETER pcFieldValues    AS CHARACTER  NO-UNDO.   
DEFINE INPUT PARAMETER pcKeyFieldValue  AS CHARACTER  NO-UNDO. 
DEFINE INPUT PARAMETER phlookup         AS HANDLE     NO-UNDO. 

Table 1–3 describes the lookupDisplayCompleteEvent parameters.

Table 1–3: lookupDisplayCompleteEvent parameters
Parameter
Description
pcFieldNames
A comma-delimited list of field names (in the form table.fieldname) that includes the key field, the displayed field, all the selected browse fields, and the selected linked fields, each field appearing only once in the list.
pcFieldValues
A CHR(1)-delimited list of the corresponding values for the pcFieldNames.
pcKeyFieldValue
The key field value of the selected record.
phlookup
The handle of the lookup SmartDataField instance, used to determine which lookup on your viewer caused the event to occur (in the case where your viewer contains multiple lookups).

To use this event, simply add a procedure to your viewer’s custom super procedure with the name lookupDisplayComplete and the above parameters. Then in initializeObject of your super procedure, before the RUN SUPER statement, add the following line:

SUBSCRIBE PROCEDURE TARGET-PROCEDURE TO "lookupDisplayComplete":U  
  IN TARGET-PROCEDURE. 

This event is useful if you want to use the values in the linked fields when the viewer starts up. The lookupComplete hook would not be available at this time, as the lookups have not actually been used yet. It might also be necessary to pass new or linked values on to other viewers, in which case this event would also be useful.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095